<?php $user=$session->read('User');
$companyid=$session->read("companyid");
?>
<div class="right_side_operate_area">
	<div class="right_side_title left">
		<h2>
		<?php 
		$companyname=$session->read("companyname");
		echo $html->link($companyname,"/companys/showinfosummary/".$companyid);
		?>
		</h2>
		<div class="clear"></div>
	</div>
    <div class="right item_add_btn">
    <?php 
    	if($form->value('CompFinacerelease.id'))
    	{
    		$str_title=__("Edit",true);
		}
		else
		{
			$str_title=__("Add",true);
		}
		echo $html->link(__("Cancel",true).$str_title,"/companys/finacerelease/");
    ?>
    </div>
    <div class="clear"></div>
</div>

<div class="right_side_scollbar">
    <div class="detail_info_panel">
    
    	<?php echo $form -> create('companys', array('action' => 'editfinacerelease','type'=> 'post','onsubmit'=>'return  checkedinfo()') ); ?>
		
		<div class="details_item_line">
	      <div class="details_item">
		      <div class="form_left_title left"><font style="color:red">*</font>标题：</div>
		      <div class="form_right_e_input left"><?php echo $form->text('CompFinacerelease.title');?></div>
		      <div id='titlemessage' style='display:none;' class="error_message">请填写标题</div>
	      </div>
		</div>
		<div class="details_item_line">
	      <div class="details_item">
		      <div class="form_left_title left"><font style="color:red">*</font>金额：</div>
		      <div class="form_right_e_input left">
		      <?php echo $form->text('CompFinacerelease.amount',array("placeholder"=>"0.00","onkeydown"=>"checkpricekeyup(this,event)"));?>万元		     
		      </div>
		      <div id='amountmessage' style='display:none;' class="error_message">请填写金额</div>
		  </div>
		</div>
		<div class="details_item_line">
	      <div class="details_item">
	      <div class="form_left_title left"><font style="color:red">*</font>需求：</div>
	      <div class="form_right_e_input left"><?php echo $form->textarea('CompFinacerelease.requirement',array('class' => 'form_textarea'));?></div>
	        <div id='requirementmessage' style='display:none;' class="error_message">需求不能为空！</div>
	      </div>
		</div>
		
		 <div class="details_item_line">
			<div class="details_item">
				<div class="form_left_title left"></div>
		        <div class="form_add_submit left">
		        	<?php echo $form->submit(__('Save',true), array("id"=>"addactive","name"=>"submit","class"=>"buttom","div"=>false));  ?>
		            <?php echo $form->hidden('CompFinacerelease.cid',array("value"=>$companyid)) ;?>
		        	<?php echo $form->hidden('CompFinacerelease.id') ?>
		        </div>
			</div>
		</div>
		
		
    </div>
</div>

<script>

function checkedinfo(){
	if($("#CompFinacereleaseTitle").val().trim() == ''){
		$("#titlemessage").css('display','block');
		return false;
  	}else{
	 	 $("#titlemessage").css('display','none');
	}
	if($("#CompFinacereleaseAmount").val().trim() == ''){
		$("#amountmessage").css('display','block');
		return false;
	}else{
		$("#amountmessage").css('display','none');
	}
	if($("#CompFinacereleaseRequirement").val().trim() == ''){
		$("#requirementmessage").css('display','block');
		return false;
	}else{
		$("#requirementmessage").css('display','none');
	}
}
</script>
